package com.bestcem.xm.txtanls.grpc.service.param.chart;

import com.bestcem.xm.common.core.constant.RegTypes;
import com.bestcem.xm.txtanls.service.dto.chart.TimeRangeDTO;
import lombok.Getter;
import lombok.Setter;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 文本分析请求基础参数
 *
 * @author jy.zhao
 * @version 1.0
 * @date 2021/5/13 13:38
 **/
@Getter
@Setter
public class BaseChartParam {

    @NotBlank(message = "项目id不能为空")
    @Pattern(regexp = RegTypes.OBJECT_ID, message = "项目id格式错误")
    private String projectId;

    private String fieldId;

    private @Valid TimeRangeDTO timeRangeDTO;

}
